package com.itheima.mapper;

import com.itheima.pojo.Role;
import com.itheima.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {
    // 根据用户名查询用户
    @Select("select * from t_user where username = #{username}")
    User findByUsername(String username);

    // 根据用户id查询角色

    List<Role> findRByUserRole(Integer id);
}
